package com.hst.capacity.infra.persistence.jpa.setting.station;

import com.hst.capacity.domain.model.entity.setting.station.InnerScopeEntity;
import com.hst.capacity.domain.model.entity.setting.station.SysRegionEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface InnerScopeRepository extends CrudRepository<InnerScopeEntity, String> {

    List<InnerScopeEntity> findByIdFranchiseeAndRegionCode(String idFranchisee, String regionCode);

    @Query("SELECT t FROM InnerScopeEntity t WHERE t.idChannel=:idChannel AND t.regionCode =:regionCode AND t.stationSwicth = 1")
    List<InnerScopeEntity> findByIdChannelAndRegionCode(String idChannel, String regionCode);

}
